﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace DARE
{
    public class CSelectorData : CWidgetData
    {
        public string currentWidgetDisplayed;
        public bool displayNumPage;
        public bool enableLoop;
        public Color numPageColor;
        public int selectedIndex;

        public override void FillDataStructure(CWidget wid)
        {
            CSelector w = wid as CSelector;
            base.FillDataStructure(wid);
            currentWidgetDisplayed = w.CurrentWidgetDisplayed.Name;
            displayNumPage = w.DisplayNumPage;
            enableLoop = w.EnableLoop;
            numPageColor = w.NumPageColor;
            selectedIndex = w.SelectedIndex;
        }

        public override void FillFromDataStructure(ref CWidget wid, CHUDSystem hud)
        {
            base.FillFromDataStructure(ref wid, hud);
            (wid as CSelector).DisplayNumPage = displayNumPage;
            (wid as CSelector).EnableLoop = enableLoop;
            (wid as CSelector).NumPageColor = numPageColor;
            (wid as CSelector).SelectedIndex = selectedIndex;
        }

    }
}
